package com.yingxin.yxerp.module.activiti.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yingxin.yx.framework.commons.vo.CommonReqVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 编辑申请
 * @author yuebao
 * @since 2023-05-22
 */

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="UpdateDateApplyCreateVo对象", description="修改申请")
public class UpdateDateApplyCreateVo extends CommonReqVo {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    private String id;

    @ApiModelProperty(value = "业务 id ")
    @Length(max = 35)
    @NotBlank
    private String businessId;

    @ApiModelProperty(value = "业务类型 ")
    @Length(max = 30)
    private String businessType;

    @ApiModelProperty(value = "业务 no ")
    @Length(max = 35)
    private String businessNo;

    @ApiModelProperty(value = "申请原因")
    @Length(max = 255)
    private String reason;

    /**
     * 改前描述
     */
    @Length(max = 3000)
    private String updateFrontRemarks;

    /**
     * 改后描述
     */
    @Length(max = 3000)
    private String updateAfterRemarks;

    /**
     * 原来单据状态-拒绝后改回
     */
    private String originalFlag;

    /**
     * 改后的对象
     * 序列化
     */
    @Length(max = 3000)
    private String bill;

    /**
     * 改后的对象集
     * 序列化
     */
    @Length(max = 3000)
    private String items;

    /**
     * 改后的对象
     * json
     */
    private String billJson;

    /**
     * 改后的对象集
     * json
     */
    private String itemsJson;

    /**
     * 改前附件
     * json
     */
    private String oldAttachmentJson;

    /**
     * 改后附件
     * json
     */
    private String newAttachmentJson;

    /**
     * 责任人ID
     */
    @NotBlank(message = "责任人不能为空！")
    private String personResponsibleId;

    @ApiModelProperty(value = "发生时间", required = true)
    @NotNull(message = "发生时间不能为空！")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date occurrenceTime;

    /**
     * 热轧代工轧硬是否入本公司： 0 是， 1 否
     * 1 时编辑申请走特殊流程，说明是安融销售部的业务
     */
    private String isInMyCompany;

}
